package com.webside.series.mapper;

import java.util.HashMap;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.webside.base.basemapper.BaseMapper;
import com.webside.distinguish.model.SeriesDist;
import com.webside.series.model.SeriesEntity;
import com.webside.util.PageUtil;

public interface SeriesMapper extends BaseMapper<SeriesEntity, Long> {

	// 添加
	public int insert(SeriesEntity record);

	// 修改
	public int update(SeriesEntity record);

	// 刪除
	public int deleteBatchById(List<Long> roleIds);

	// 查询type
	List<SeriesEntity> typeByAllselect();

	public int updateSetSum(SeriesEntity record);

	// 处理
	public int updateDispose(List<Long> roleIds);

	// 上线
	public int updateOnline(List<Long> roleIds);

	// 下线
	public int updateOffline(List<Long> roleIds);

	// 查询剧集总数
	public int queryAllSeries();

	// 分页查询剧集
	public List<SeriesEntity> querySeries(@Param("page") PageUtil pageUtil, @Param("sort") String sort);

	// 根据剧名查询
	public List<SeriesEntity> queryListByName(@Param("seriesName") String seriesName);
//分页查询
	public List<HashMap<String, Object>> querySeriesMap(@Param("pageUtil") PageUtil pageUtil,@Param("seriesName") String seriesName,@Param("code") String code);

	// 根据参查询符合条件的未处理剧集 (lpz)
	// public List<SeriesEntity> SelectDealSeriesList(SeriesEntity record);
	public List<SeriesEntity> findListByName(@Param("page")PageUtil pageUtil,@Param("sort")String sort);
	public List<SeriesEntity> selectall(@Param("count")int count,@Param("sort")String sort);

	public List<SeriesDist> selectSeriesByChannelAndName(@Param("name")String name,@Param("channel") String channel,@Param("distinguishId")Long distinguishId);
	public int selectCountByChannelAndName(@Param("name")String name,@Param("channel") String channel,@Param("distinguishId")Long distinguishId);
	public List<SeriesDist> selectSeriesByChannelAndNameInDistinguish(@Param("name")String name,@Param("channel") String channel,@Param("distinguishId")Long distinguishId);
	public int selectCountByChannelAndNameInDistinguish(@Param("name")String name,@Param("channel") String channel,@Param("distinguishId")Long distinguishId);
}